package tech.aistar;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ImportResource;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import tech.aistar.util.IdWorker;

//@ImportResource(locations = "classpath:spring-bean.xml")
@ServletComponentScan //能够识别Servlet注解
//将该包下的所有的mapper接口的代理实现类的创建交给spring完成.
@MapperScan(basePackages = "tech.aistar.mapper")
@EnableTransactionManagement
@SpringBootApplication
public class SpringbootJ13Application {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootJ13Application.class, args);
    }

//    @Bean
//    public IdWorker idWorker(){
//        return new IdWorker();
//    }
}
